package com.example.frame.bean;

import java.util.HashMap;
import java.util.Map;

/** @author chenjiebin */
public class View {
    /** 视图路径 */
    private Map<String, Object> model;
    /** 模型数据 */
    private String path;

    public View() {
    }

    public View(String path) {
        this.path = path;
        this.model = new HashMap<>();
    }

    public View addModel(String key, Object value) {
        model.put(key, value);
        return this;
    }

    public Map<String, Object> getModel() {
        return model;
    }

    public String getPath() {
        return path;
    }
}
